home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / MFCINC.PAK / AFXDLGS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  18.6 KB  |  644 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1995 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. #ifndef __AFXDLGS_H__
  12. #define __AFXDLGS_H__
  13.  
  14. #ifndef __AFXWIN_H__
  15.     #include <afxwin.h>
  16. #endif
  17.  
  18. #ifndef _INC_COMMDLG
  19.     #include <commdlg.h>    // common dialog APIs
  20. #endif
  21.  
  22. // Avoid mapping GetFileTitle to GetFileTitle[A/W]
  23. #ifdef GetFileTitle
  24. #undef GetFileTitle
  25. inline short APIENTRY GetFileTitle(LPCTSTR lpszFile, LPTSTR lpszTitle, WORD cbBuf)
  26. #ifdef UNICODE
  27.     { return ::GetFileTitleW(lpszFile, lpszTitle, cbBuf); }
  28. #else
  29.     { return ::GetFileTitleA(lpszFile, lpszTitle, cbBuf); }
  30. #endif
  31. #endif
  32.  
  33. #ifndef _AFX_NO_RICHEDIT_SUPPORT
  34.     #ifndef _RICHEDIT_
  35.         #include <richedit.h>
  36.     #endif
  37. #endif
  38.  
  39. #ifdef _AFX_MINREBUILD
  40. #pragma component(minrebuild, off)
  41. #endif
  42. #ifndef _AFX_FULLTYPEINFO
  43. #pragma component(mintypeinfo, on)
  44. #endif
  45.  
  46. #ifndef _AFX_NOFORCE_LIBS
  47. #ifndef _MAC
  48.  
  49. /////////////////////////////////////////////////////////////////////////////
  50. // Win32 libraries
  51.  
  52. #else //!_MAC
  53.  
  54. /////////////////////////////////////////////////////////////////////////////
  55. // Mac libraries
  56.  
  57. #endif //_MAC
  58. #endif //!_AFX_NOFORCE_LIBS
  59.  
  60. /////////////////////////////////////////////////////////////////////////////
  61.  
  62. #ifdef _AFX_PACKING
  63. #pragma pack(push, _AFX_PACKING)
  64. #endif
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67. // AFXDLGS - MFC Standard dialogs
  68.  
  69. // Classes declared in this file
  70.  
  71.     // CDialog
  72.         class CCommonDialog;  // implementation base class
  73.  
  74.             // modeless dialogs
  75.             class CFindReplaceDialog; // Find/FindReplace dialog
  76.  
  77.             // modal dialogs
  78.             class CFileDialog;    // FileOpen/FileSaveAs dialogs
  79.             class CColorDialog;   // Color picker dialog
  80.             class CFontDialog;    // Font chooser dialog
  81.             class CPrintDialog;   // Print/PrintSetup dialogs
  82.             class CPageSetupDialog; // Page Setup dialog
  83.  
  84.     // CWnd
  85.     class CPropertySheet;     // implements tabbed dialogs
  86.  
  87.     // CDialog
  88.         class CPropertyPage;  // Used with CPropertySheet for tabbed dialogs
  89.  
  90. /////////////////////////////////////////////////////////////////////////////
  91.  
  92. #undef AFX_DATA
  93. #define AFX_DATA AFX_CORE_DATA
  94.  
  95. /////////////////////////////////////////////////////////////////////////////
  96. // CCommonDialog - base class for all common dialogs
  97.  
  98. class CCommonDialog : public CDialog
  99. {
  100. public:
  101.     CCommonDialog(CWnd* pParentWnd);
  102.  
  103. // Implementation
  104. protected:
  105.     virtual void OnOK();
  106.     virtual void OnCancel();
  107. };
  108.  
  109. /////////////////////////////////////////////////////////////////////////////
  110. // CFileDialog - used for FileOpen... or FileSaveAs...
  111.  
  112. class CFileDialog : public CCommonDialog
  113. {
  114.     DECLARE_DYNAMIC(CFileDialog)
  115.  
  116. public:
  117. // Attributes
  118.     OPENFILENAME m_ofn; // open file parameter block
  119.  
  120. // Constructors
  121.     CFileDialog(BOOL bOpenFileDialog, // TRUE for FileOpen, FALSE for FileSaveAs
  122.         LPCTSTR lpszDefExt = NULL,
  123.         LPCTSTR lpszFileName = NULL,
  124.         DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
  125.         LPCTSTR lpszFilter = NULL,
  126.         CWnd* pParentWnd = NULL);
  127.  
  128. // Operations
  129.     virtual int DoModal();
  130.  
  131.     // Helpers for parsing file name after successful return
  132.     // or during Overridable callbacks if OFN_EXPLORER is set
  133.     CString GetPathName() const;  // return full path and filename
  134.     CString GetFileName() const;  // return only filename
  135.     CString GetFileExt() const;   // return only ext
  136.     CString GetFileTitle() const; // return file title
  137.     BOOL GetReadOnlyPref() const; // return TRUE if readonly checked
  138.  
  139.     // Enumerating multiple file selections
  140.     POSITION GetStartPosition() const;
  141.     CString GetNextPathName(POSITION& pos) const;
  142.  
  143.     // Helpers for custom templates
  144.     void SetTemplate(UINT nWin3ID, UINT nWin4ID);
  145.     void SetTemplate(LPCTSTR lpWin3ID, LPCTSTR lpWin4ID);
  146.  
  147. #ifndef _MAC
  148.     // Other operations available while the dialog is visible
  149.     CString GetFolderPath() const; // return full path
  150.     void SetControlText(int nID, LPCSTR lpsz);
  151.     void HideControl(int nID);
  152.     void SetDefExt(LPCSTR lpsz);
  153. #endif
  154.  
  155. // Overridable callbacks
  156. protected:
  157.     friend UINT CALLBACK _AfxCommDlgProc(HWND, UINT, WPARAM, LPARAM);
  158.     virtual UINT OnShareViolation(LPCTSTR lpszPathName);
  159.     virtual BOOL OnFileNameOK();
  160.     virtual void OnLBSelChangedNotify(UINT nIDBox, UINT iCurSel, UINT nCode);
  161.  
  162.     // only called back if OFN_EXPLORER is set
  163.     virtual void OnInitDone();
  164.     virtual void OnFileNameChange();
  165.     virtual void OnFolderChange();
  166.     virtual void OnTypeChange();
  167.  
  168. // Implementation
  169. #ifdef _DEBUG
  170. public:
  171.     virtual void Dump(CDumpContext& dc) const;
  172. #endif
  173.  
  174. protected:
  175.     BOOL m_bOpenFileDialog;       // TRUE for file open, FALSE for file save
  176.     CString m_strFilter;          // filter string
  177.                         // separate fields with '|', terminate with '||\0'
  178.     TCHAR m_szFileTitle[64];       // contains file title after return
  179.     TCHAR m_szFileName[_MAX_PATH]; // contains full path name after return
  180.  
  181.     OPENFILENAME*  m_pofnTemp;
  182.  
  183.     virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  184. };
  185.  
  186. /////////////////////////////////////////////////////////////////////////////
  187. // CFontDialog - used to select a font
  188.  
  189. class CFontDialog : public CCommonDialog
  190. {
  191.     DECLARE_DYNAMIC(CFontDialog)
  192.  
  193. public:
  194. // Attributes
  195.     // font choosing parameter block
  196.     CHOOSEFONT m_cf;
  197.  
  198. // Constructors
  199.     CFontDialog(LPLOGFONT lplfInitial = NULL,
  200.         DWORD dwFlags = CF_EFFECTS | CF_SCREENFONTS,
  201.         CDC* pdcPrinter = NULL,
  202.         CWnd* pParentWnd = NULL);
  203. #ifndef _AFX_NO_RICHEDIT_SUPPORT
  204.     CFontDialog(const CHARFORMAT& charformat,
  205.         DWORD dwFlags = CF_SCREENFONTS,
  206.         CDC* pdcPrinter = NULL,
  207.         CWnd* pParentWnd = NULL);
  208. #endif
  209. // Operations
  210.     virtual int DoModal();
  211.  
  212.     // Get the selected font (works during DoModal displayed or after)
  213.     void GetCurrentFont(LPLOGFONT lplf);
  214.  
  215.     // Helpers for parsing information after successful return
  216.     CString GetFaceName() const;  // return the face name of the font
  217.     CString GetStyleName() const; // return the style name of the font
  218.     int GetSize() const;          // return the pt size of the font
  219.     COLORREF GetColor() const;    // return the color of the font
  220.     int GetWeight() const;        // return the chosen font weight
  221.     BOOL IsStrikeOut() const;     // return TRUE if strikeout
  222.     BOOL IsUnderline() const;     // return TRUE if underline
  223.     BOOL IsBold() const;          // return TRUE if bold font
  224.     BOOL IsItalic() const;        // return TRUE if italic font
  225. #ifndef _AFX_NO_RICHEDIT_SUPPORT
  226.     void GetCharFormat(CHARFORMAT& cf) const;
  227. #endif
  228.  
  229. // Implementation
  230.     LOGFONT m_lf; // default LOGFONT to store the info
  231. #ifndef _AFX_NO_RICHEDIT_SUPPORT
  232.     DWORD FillInLogFont(const CHARFORMAT& cf);
  233. #endif
  234.  
  235. #ifdef _DEBUG
  236. public:
  237.     virtual void Dump(CDumpContext& dc) const;
  238. #endif
  239.  
  240. protected:
  241.     TCHAR m_szStyleName[64]; // contains style name after return
  242. };
  243.  
  244. /////////////////////////////////////////////////////////////////////////////
  245. // CColorDialog - used to select a color
  246.  
  247. class CColorDialog : public CCommonDialog
  248. {
  249.     DECLARE_DYNAMIC(CColorDialog)
  250.  
  251. public:
  252. // Attributes
  253.     // color chooser parameter block
  254.     CHOOSECOLOR m_cc;
  255.  
  256. // Constructors
  257.     CColorDialog(COLORREF clrInit = 0, DWORD dwFlags = 0,
  258.             CWnd* pParentWnd = NULL);
  259.  
  260. // Operations
  261.     virtual int DoModal();
  262.  
  263.     // Set the current color while dialog is displayed
  264.     void SetCurrentColor(COLORREF clr);
  265.  
  266.     // Helpers for parsing information after successful return
  267.     COLORREF GetColor() const;
  268.     static COLORREF* PASCAL GetSavedCustomColors();
  269.  
  270. // Overridable callbacks
  271. protected:
  272.     friend UINT CALLBACK _AfxCommDlgProc(HWND, UINT, WPARAM, LPARAM);
  273.     virtual BOOL OnColorOK();       // validate color
  274.  
  275. // Implementation
  276.  
  277. #ifdef _DEBUG
  278. public:
  279.     virtual void Dump(CDumpContext& dc) const;
  280. #endif
  281.  
  282. protected:
  283.     //{{AFX_MSG(CColorDialog)
  284.     afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  285.     //}}AFX_MSG
  286.     DECLARE_MESSAGE_MAP()
  287. };
  288.  
  289. // for backward compatibility clrSavedCustom is defined as GetSavedCustomColors
  290. #define clrSavedCustom GetSavedCustomColors()
  291.  
  292. #ifndef _MAC
  293. /////////////////////////////////////////////////////////////////////////////
  294. // Page Setup dialog
  295.  
  296. class CPageSetupDialog : public CCommonDialog
  297. {
  298.     DECLARE_DYNAMIC(CPageSetupDialog)
  299.  
  300. public:
  301. // Attributes
  302.     PAGESETUPDLG m_psd;
  303.  
  304. // Constructors
  305.     CPageSetupDialog(DWORD dwFlags = PSD_MARGINS | PSD_INWININIINTLMEASURE,
  306.         CWnd* pParentWnd = NULL);
  307.  
  308. // Attributes
  309.     LPDEVMODE GetDevMode() const;   // return DEVMODE
  310.     CString GetDriverName() const;  // return driver name
  311.     CString GetDeviceName() const;  // return device name
  312.     CString GetPortName() const;    // return output port name
  313.     HDC CreatePrinterDC();
  314.     CSize GetPaperSize() const;
  315.     void GetMargins(LPRECT lpRectMargins, LPRECT lpRectMinMargins) const;
  316.  
  317. // Operations
  318.     virtual int DoModal();
  319.  
  320. // Overridables
  321.     virtual UINT PreDrawPage(WORD wPaper, WORD wFlags, LPPAGESETUPDLG pPSD);
  322.     virtual UINT OnDrawPage(CDC* pDC, UINT nMessage, LPRECT lpRect);
  323.  
  324. // Implementation
  325. protected:
  326.     static UINT CALLBACK PaintHookProc(HWND hWnd, UINT message, WPARAM wParam,
  327.         LPARAM lParam);
  328.  
  329. #ifdef _DEBUG
  330. public:
  331.     virtual void Dump(CDumpContext& dc) const;
  332. #endif
  333. };
  334. #endif //!_MAC
  335.  
  336. /////////////////////////////////////////////////////////////////////////////
  337. // CPrintDialog - used for Print... and PrintSetup...
  338.  
  339. class CPrintDialog : public CCommonDialog
  340. {
  341.     DECLARE_DYNAMIC(CPrintDialog)
  342.  
  343. public:
  344. // Attributes
  345.     // print dialog parameter block (note this is a reference)
  346.     PRINTDLG& m_pd;
  347.  
  348. // Constructors
  349.     CPrintDialog(BOOL bPrintSetupOnly,
  350.         // TRUE for Print Setup, FALSE for Print Dialog
  351.         DWORD dwFlags = PD_ALLPAGES | PD_USEDEVMODECOPIES | PD_NOPAGENUMS
  352.             | PD_HIDEPRINTTOFILE | PD_NOSELECTION,
  353.         CWnd* pParentWnd = NULL);
  354.  
  355. // Operations
  356.     virtual int DoModal();
  357.  
  358.     // GetDefaults will not display a dialog but will get
  359.     // device defaults
  360.     BOOL GetDefaults();
  361.  
  362.     // Helpers for parsing information after successful return
  363.     int GetCopies() const;          // num. copies requested
  364.     BOOL PrintCollate() const;      // TRUE if collate checked
  365.     BOOL PrintSelection() const;    // TRUE if printing selection
  366.     BOOL PrintAll() const;          // TRUE if printing all pages
  367.     BOOL PrintRange() const;        // TRUE if printing page range
  368.     int GetFromPage() const;        // starting page if valid
  369.     int GetToPage() const;          // starting page if valid
  370.     LPDEVMODE GetDevMode() const;   // return DEVMODE
  371.     CString GetDriverName() const;  // return driver name
  372.     CString GetDeviceName() const;  // return device name
  373.     CString GetPortName() const;    // return output port name
  374.     HDC GetPrinterDC() const;       // return HDC (caller must delete)
  375.  
  376.     // This helper creates a DC based on the DEVNAMES and DEVMODE structures.
  377.     // This DC is returned, but also stored in m_pd.hDC as though it had been
  378.     // returned by CommDlg.  It is assumed that any previously obtained DC
  379.     // has been/will be deleted by the user.  This may be
  380.     // used without ever invoking the print/print setup dialogs.
  381.  
  382.     HDC CreatePrinterDC();
  383.  
  384. // Implementation
  385.  
  386. #ifdef _DEBUG
  387. public:
  388.     virtual void Dump(CDumpContext& dc) const;
  389. #endif
  390.  
  391. private:
  392.     PRINTDLG m_pdActual; // the Print/Print Setup need to share this
  393. protected:
  394.     // The following handle the case of print setup... from the print dialog
  395.     CPrintDialog(PRINTDLG& pdInit);
  396.     virtual CPrintDialog* AttachOnSetup();
  397.  
  398.     //{{AFX_MSG(CPrintDialog)
  399.     afx_msg void OnPrintSetup();
  400.     //}}AFX_MSG
  401.     DECLARE_MESSAGE_MAP()
  402. };
  403.  
  404. /////////////////////////////////////////////////////////////////////////////
  405. // Find/FindReplace modeless dialogs
  406.  
  407. class CFindReplaceDialog : public CCommonDialog
  408. {
  409.     DECLARE_DYNAMIC(CFindReplaceDialog)
  410.  
  411. public:
  412. // Attributes
  413.     FINDREPLACE m_fr;
  414.  
  415. // Constructors
  416.     CFindReplaceDialog();
  417.     // Note: you must allocate these on the heap.
  418.     //  If you do not, you must derive and override PostNcDestroy()
  419.  
  420.     BOOL Create(BOOL bFindDialogOnly, // TRUE for Find, FALSE for FindReplace
  421.             LPCTSTR lpszFindWhat,
  422.             LPCTSTR lpszReplaceWith = NULL,
  423.             DWORD dwFlags = FR_DOWN,
  424.             CWnd* pParentWnd = NULL);
  425.  
  426.     // find/replace parameter block
  427.     static CFindReplaceDialog* PASCAL GetNotifier(LPARAM lParam);
  428.  
  429. // Operations
  430.     // Helpers for parsing information after successful return
  431.     CString GetReplaceString() const;// get replacement string
  432.     CString GetFindString() const;   // get find string
  433.     BOOL SearchDown() const;         // TRUE if search down, FALSE is up
  434.     BOOL FindNext() const;           // TRUE if command is find next
  435.     BOOL MatchCase() const;          // TRUE if matching case
  436.     BOOL MatchWholeWord() const;     // TRUE if matching whole words only
  437.     BOOL ReplaceCurrent() const;     // TRUE if replacing current string
  438.     BOOL ReplaceAll() const;         // TRUE if replacing all occurrences
  439.     BOOL IsTerminating() const;      // TRUE if terminating dialog
  440.  
  441. // Implementation
  442. protected:
  443.     virtual void PostNcDestroy();
  444.  
  445. #ifdef _DEBUG
  446. public:
  447.     virtual void Dump(CDumpContext& dc) const;
  448. #endif
  449.  
  450. protected:
  451.     TCHAR m_szFindWhat[128];
  452.     TCHAR m_szReplaceWith[128];
  453. };
  454.  
  455. ////////////////////////////////////////////////////////////////////////////
  456. // CPropertyPage -- one page of a tabbed dialog
  457.  
  458. class CPropertyPage : public CDialog
  459. {
  460.     DECLARE_DYNAMIC(CPropertyPage)
  461.  
  462. // Construction
  463. public:
  464.     CPropertyPage(UINT nIDTemplate, UINT nIDCaption = 0);
  465.     CPropertyPage(LPCTSTR lpszTemplateName, UINT nIDCaption = 0);
  466.     CPropertyPage();
  467.     void Construct(UINT nIDTemplate, UINT nIDCaption = 0);
  468.     void Construct(LPCTSTR lpszTemplateName, UINT nIDCaption = 0);
  469.  
  470. // Attributes
  471.     PROPSHEETPAGE   m_psp;
  472.  
  473. // Operations
  474.     void CancelToClose();
  475.     void SetModified(BOOL bChanged = TRUE);
  476.     LRESULT QuerySiblings(WPARAM wParam, LPARAM lParam);
  477.  
  478. // Overridables
  479. public:
  480.     virtual BOOL OnApply();
  481.     virtual void OnReset();
  482.     virtual void OnOK();
  483.     virtual void OnCancel();
  484.     virtual BOOL OnSetActive();
  485.     virtual BOOL OnKillActive();
  486.     virtual BOOL OnQueryCancel();
  487.  
  488.     virtual LRESULT OnWizardBack();
  489.     virtual LRESULT OnWizardNext();
  490.     virtual BOOL OnWizardFinish();
  491.  
  492. // Implementation
  493. public:
  494.     virtual ~CPropertyPage();
  495. #ifdef _DEBUG
  496.     virtual void AssertValid() const;
  497.     virtual void Dump(CDumpContext& dc) const;
  498.     void EndDialog(int nEndID); // incorrect to call and will assert
  499. #endif
  500.  
  501. protected:
  502.     // private implementation data
  503.     CString m_strCaption;
  504.  
  505.     // implementation helpers
  506.     void CommonConstruct(LPCTSTR lpszTemplateName, UINT nIDCaption);
  507.     virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  508.     virtual BOOL PreTranslateMessage(MSG*);
  509.     LRESULT MapWizardResult(LRESULT lToMap);
  510.  
  511.     void PreProcessPageTemplate(PROPSHEETPAGE& psp, BOOL bWizard);
  512. #ifndef _AFX_NO_OCC_SUPPORT
  513.     void Cleanup();
  514.     const DLGTEMPLATE* InitDialogInfo(const DLGTEMPLATE* pTemplate);
  515. #endif
  516.  
  517.     // Generated message map functions
  518.     //{{AFX_MSG(CPropertyPage)
  519.     afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  520.     //}}AFX_MSG
  521.     DECLARE_MESSAGE_MAP()
  522.  
  523.     friend class CPropertySheet;
  524. };
  525.  
  526. ////////////////////////////////////////////////////////////////////////////
  527. // CPropertySheet -- a tabbed "dialog" (really a popup-window)
  528.  
  529. class CTabCtrl; // forward reference (see afxcmn.h)
  530.  
  531. class CPropertySheet : public CWnd
  532. {
  533.     DECLARE_DYNAMIC(CPropertySheet)
  534.  
  535. // Construction
  536. public:
  537.     CPropertySheet();
  538.     CPropertySheet(UINT nIDCaption, CWnd* pParentWnd = NULL,
  539.         UINT iSelectPage = 0);
  540.     CPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL,
  541.         UINT iSelectPage = 0);
  542.     void Construct(UINT nIDCaption, CWnd* pParentWnd = NULL,
  543.         UINT iSelectPage = 0);
  544.     void Construct(LPCTSTR pszCaption, CWnd* pParentWnd = NULL,
  545.         UINT iSelectPage = 0);
  546.  
  547.     // for modeless creation
  548.     BOOL Create(CWnd* pParentWnd = NULL, DWORD dwStyle = (DWORD)-1,
  549.         DWORD dwExStyle = 0);
  550.     // the default style, expressed by passing -1 as dwStyle, is actually:
  551.     // WS_SYSMENU | WS_POPUP | WS_CAPTION | DS_MODALFRAME | DS_CONTEXT_HELP | WS_VISIBLE
  552.  
  553. // Attributes
  554. public:
  555.     PROPSHEETHEADER m_psh;
  556.  
  557.     int GetPageCount() const;
  558.     CPropertyPage* GetActivePage() const;
  559.     int GetActiveIndex() const;
  560.     CPropertyPage* GetPage(int nPage) const;
  561.     int GetPageIndex(CPropertyPage* pPage);
  562.     BOOL SetActivePage(int nPage);
  563.     BOOL SetActivePage(CPropertyPage* pPage);
  564.     void SetTitle(LPCTSTR lpszText, UINT nStyle = 0);
  565.     CTabCtrl* GetTabControl() const;
  566.  
  567.     void SetWizardMode();
  568.     void SetFinishText(LPCTSTR lpszText);
  569.     void SetWizardButtons(DWORD dwFlags);
  570.  
  571. // Operations
  572. public:
  573.     virtual int DoModal();
  574.     void AddPage(CPropertyPage* pPage);
  575.     void RemovePage(CPropertyPage* pPage);
  576.     void RemovePage(int nPage);
  577.     void EndDialog(int nEndID); // used to terminate a modal dialog
  578.     BOOL PressButton(int nButton);
  579.  
  580. // Implementation
  581. public:
  582.     virtual ~CPropertySheet();
  583. #ifdef _DEBUG
  584.     virtual void AssertValid() const;
  585.     virtual void Dump(CDumpContext& dc) const;
  586. #endif
  587.     void CommonConstruct(CWnd* pParentWnd, UINT iSelectPage);
  588.     void EnableStackedTabs(BOOL bStacked);
  589.     virtual BOOL PreTranslateMessage(MSG* pMsg);
  590.     virtual void BuildPropPageArray();
  591.     virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  592.     virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra,
  593.         AFX_CMDHANDLERINFO* pHandlerInfo);
  594.     virtual BOOL OnInitDialog();
  595.     virtual BOOL ContinueModal();
  596.  
  597. protected:
  598.     CPtrArray m_pages;      // array of CPropertyPage pointers
  599.     CString m_strCaption;   // caption of the pseudo-dialog
  600.     CWnd* m_pParentWnd;     // parent window of property sheet
  601.     BOOL m_bStacked;        // EnableStackedTabs sets this
  602.     BOOL m_bModeless;       // TRUE when Create called instead of DoModal
  603.  
  604.     // Generated message map functions
  605.     //{{AFX_MSG(CPropertySheet)
  606.     afx_msg BOOL OnNcCreate(LPCREATESTRUCT);
  607.     afx_msg LRESULT HandleInitDialog(WPARAM, LPARAM);
  608.     afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  609.     afx_msg LRESULT OnCommandHelp(WPARAM, LPARAM);
  610.     afx_msg void OnClose();
  611.     afx_msg void OnSysCommand(UINT nID, LPARAM);
  612.     afx_msg LRESULT OnSetDefID(WPARAM, LPARAM);
  613.     //}}AFX_MSG
  614.     DECLARE_MESSAGE_MAP()
  615.  
  616.     friend class CPropertyPage;
  617. };
  618.  
  619. /////////////////////////////////////////////////////////////////////////////
  620. // Inline function declarations
  621.  
  622. #ifdef _AFX_PACKING
  623. #pragma pack(pop)
  624. #endif
  625.  
  626. #ifdef _AFX_ENABLE_INLINES
  627. #define _AFXDLGS_INLINE inline
  628. #include <afxdlgs.inl>
  629. #endif
  630.  
  631. #undef AFX_DATA
  632. #define AFX_DATA
  633.  
  634. #ifdef _AFX_MINREBUILD
  635. #pragma component(minrebuild, on)
  636. #endif
  637. #ifndef _AFX_FULLTYPEINFO
  638. #pragma component(mintypeinfo, off)
  639. #endif
  640.  
  641. #endif //__AFXDLGS_H__
  642.  
  643. /////////////////////////////////////////////////////////////////////////////
  644.